<!DOCTYPE html>
<html>
<head>
<script>
var xhr = new XMLHttpRequest();
xhr.onload = function() {
  if (xhr.status == 200) {
    console.log('xhr.responseText = ' + xhr.responseText);
  }
};
xhr.open("GET", "example.txt");
xhr.send();
</script>
</head>
</html>
